<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>7.2.1 基本用法 P71</title>
</head>
<body>
<div id="app">
    <my-component warning-text="提示信息"></my-component>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script>
    Vue.component('my-component',{
        props:['warningText'],
        template:'<div>{{warningText}}</div>'
    });
    var app = new Vue({})
</script>
</body>
</html>